-
-
Notifications
You must be signed in to change notification settings - Fork 18.6k
CLN: Assorted #52248
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CLN: Assorted #52248
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few comments/questions, generally really nice clean-ups.
@@ -508,16 +508,16 @@ def _wrap_range_setop(self, other, res_i8): | |||
result = type(self._data)._simple_new( | |||
res_values, dtype=self.dtype, freq=new_freq | |||
) | |||
return self._wrap_setop_result(other, result) | |||
return cast("Self", self._wrap_setop_result(other, result)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like Index._wrap_setop_result
should return Self
instead of Index
? Then you could avoid this cast?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't bc it uses shallow_copy which doesn't return Self for RangeIndex
Thanks @jbrockmendel |
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.